<div class="container-fluid">
    <hr />
    <?php $categories = $viewModel->get("categories"); ?> 
    <?php include 'views/Include/alert.php'; ?>

    <form class="form-horizontal" method="POST">
        <div class="control-group">
            <label class="control-label" for="inputtitle">Title</label>
            <div class="controls">
                <input type="text" id="inputtitle" name="title" placeholder="title" required="required" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputCategoryID">Category</label>
            <div class="controls">
                <select id="inputCategoryID" name="category_id">
                    <?php
                    foreach ($categories as $categories) {
                        echo "<option value='" . $categories->category_id . "'>" . $categories->category_name . "</option>";
                    }
                    ?>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputContent">Content</label>
            <div class="controls">
                <textarea id="inputContent" class="editor_noimage" name="content" placeholder="Content" required="required" style="margin: 0px; height: 167px; width: 457px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputBody">Body</label>
            <div class="controls">
                <textarea id="inputBody" class="ckeditor" name="body" placeholder="Body" required="required" style="margin: 0px; height: 267px; width: 457px;"></textarea>
            </div>
   
        </div>
        <div class="control-group">
            <label class="control-label" for="inputStatus">Status</label>
            <div class="controls">
                <select name="status">
                    <option value="0">Deactive</option>
                    <option value="1">Active</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn btn-success">Submit</button>
            </div>
        </div>
    </form>
</div>
